package cn.wendellup.bootStrap.valueobject.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class UserInfo implements RowMapper<UserInfo>{
	private Integer id;
	private String firstName;
	private String lastName;
	private String phone;
	private String email;



	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getFirstName() {
		return firstName;
	}


	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}


	public String getLastName() {
		return lastName;
	}


	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	public String getPhone() {
		return phone;
	}


	public void setPhone(String phone) {
		this.phone = phone;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}


	@Override
	public UserInfo mapRow(ResultSet rs, int arg1) throws SQLException {
		UserInfo userInfo = new UserInfo();
		userInfo.setId(rs.getInt("id"));
		userInfo.setFirstName(rs.getString("firstname"));
		userInfo.setLastName(rs.getString("lastname"));
		userInfo.setPhone(rs.getString("phone"));
		userInfo.setEmail(rs.getString("email"));
		return userInfo;
	}
	
}
